package cn.tedu.egmvc1.controller;

import cn.tedu.egmvc1.pojo.dto.EmpDTO;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class EmpController {
    @RequestMapping("/emp/add")
    @ResponseBody
    public String add(EmpDTO empDTO){
        String name=empDTO.getName();
        double salary=empDTO.getSalary();
        String job=empDTO.getJob();
        System.out.println("姓名："+name+"工资："+salary+"岗位"+job);
        return "添加成功";
    }
}
